

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ChatGUI;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 * @author SKL
 */
public class helper {
    String tempMessage;
    String history = "";
    String nickname = "Nickname";
    
    Date dnow = new Date();
    SimpleDateFormat ft = new SimpleDateFormat ("H:mm");
   
    public boolean send(String Input){
        Input = Input.replace("\n", "");
        Input = Input.replace("\r", "");
        Input = Input.replace("\t", "");
        if (Input.contentEquals("")){
            return false;
        }else{
            tempMessage = Input + "\n";
            return true;
        }
    }
    
    public void applyMessage(){
        history = history + tempMessage;
    }
    
    public String getHistory(){
        return history;
    }
    
    public void setNick(String nick){
        nickname = nick;
    }
}
